package org.zbclan.bf2.rcon.home.client.event;

import com.google.gwt.event.shared.GwtEvent;

public class LevelNameListReadyEvent extends
		GwtEvent<LevelNameListReadyEventHandler> {

	public static Type<LevelNameListReadyEventHandler> TYPE = new Type<LevelNameListReadyEventHandler>();

	private String[] names;

	public LevelNameListReadyEvent(String[] names) {
		this.names = names;
	}

	@Override
	protected void dispatch(LevelNameListReadyEventHandler handler) {
		handler.onLevelNameListReady(names);
	}

	@Override
	public Type<LevelNameListReadyEventHandler> getAssociatedType() {
		return TYPE;
	}

	public String[] getNames() {
		return names;
	}

}
